﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace VehicleConfigurator
{
    public partial class FrmMain : Form
    {
        public FrmMain()
        {
            InitializeComponent();
        }

        private void subMenuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmLang frmLang = new FrmLang();
            frmLang.Show();
        }

        private void FrmMain_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void countryCodeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmCountryCode frmCoutryCode = new FrmCountryCode();
            try
            {
                frmCoutryCode.Show();
            }
            catch (InvalidOperationException)
            {
                frmCoutryCode.Show();
            }
            catch (Exception)
            {
                frmCoutryCode.Show();
            }
            
            //frmCoutryCode.Show();
        }

        private void currencyCodeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmCurrency frmCurrency = new FrmCurrency();
            frmCurrency.Show();
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {

        }

        private void makeModelEditionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmMakeModelEditioncs frmMME = new FrmMakeModelEditioncs();
            frmMME.Show();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void vehicleConfigDataToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmVehicleConfiguratorData frmVCD = new FrmVehicleConfiguratorData();
            frmVCD.Show();
        }

        private void vATToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmVat vat = new frmVat();
            vat.Show();
        }
    }
}
